<extend name="Public/base"/>

<block name="body">
    <!-- 标题栏 -->
    <div class="main-title">
        <h2>{$title}</h2>
    </div>
    <!--搜索栏-->
    <div class="cf" style="margin-bottom: 10px;">
        <span>二维码编号:</span>
        <input style="height: 25px;" type="text" id="qrcode_id" name="qrcode_id" class="search-input" value="{$search_info.qrcode_id}" placeholder="">
        <span style="margin-left: 25px;">促销员姓名:</span>
        <input style="height: 25px;" type="text" id="qy_name" name="qy_name" class="search-input" value="{$search_info.qy_name}" placeholder="">
        <span style="margin-left: 25px;">促销员编号:</span>
        <input style="height: 25px;" type="text" id="qy_uid" name="qy_uid" class="search-input" value="{$search_info.qy_uid}" placeholder="">
        <span style="margin-left: 25px;">状态:</span>
        <select id="sel" name="type">
            <if condition='$search_info.type eq 0'>
                <option value="0" selected >全部</option>
            <else />
                <option value="0">全部</option>
            </if>
            <if condition='$search_info.type eq 1'>
                <option value="1" selected >未绑定</option>
            <else />
                <option value="1">未绑定</option>
            </if>
            <if condition='$search_info.type eq 2'>
                <option value="2" selected >已绑定</option>
            <else />
                <option value="2">已绑定</option>
            </if>
            <if condition='$search_info.type eq 3'>
                <option value="3" selected >已提交</option>
            <else />
                <option value="3">已提交</option>
            </if>
            <if condition='$search_info.type eq 4'>
                <option value="4" selected >已退货</option>
            <else />
                <option value="4">已退货</option>
            </if>
        </select>
        <input id="id" value="{$pici_info.id}" hidden >
        <button style="margin-left: 25px;height: 27px;line-height: 8px;" class="btn" onClick='query()'>查  询</button>
    </div>
    <!--信息栏-->
    <div class="cf" style="margin-top: 25px;text-align: center;font-size: 16px;font-weight: bold;">{$pici_info.pici_name}&nbsp;&nbsp;&nbsp;&nbsp;{$pici_info.p_id}</div>
    <!-- 数据列表 -->
    <div class="data">
        <table>
            <thead>
            <tr>
                <th class="public_tanle_qianmian">序号</th>
                <th class="public_tanle_qianmian">二维码编号</th>
                <th class="public_tanle_qianmian">状态</th>
                <th class="public_tanle_qianmian">促销员姓名</th>
                <th class="public_tanle_qianmian">促销员编号</th>
                <th class="public_tanle_qianmian">绑定时间</th>
                <th class="public_tanle_qianmian">消费者</th>
                <th class="public_tanle_qianmian">提交时间</th>
                <th class="public_tanle_qianmian">退货原因</th>
                <th class="public_tanle_qianmian">退货时间</th>
            </tr>
            </thead>
            <tbody>
            <notempty name="list">
                <volist name="list" id="list_vo">
                    <tr>
                        <td class="public_content_qianmian">{$list_vo.number|default='--'}</td>
                        <td class="public_content_qianmian">{$list_vo.qrcode_id|default='--'}</td>
                        <if condition='$list_vo.status eq 0'>
                            <td class="public_content_qianmian">未绑定</td>
                        <elseif condition='$list_vo.status eq 1' />
                            <td class="public_content_qianmian">已绑定</td>
                        <elseif condition='$list_vo.status eq 2' />
                            <td class="public_content_qianmian">已提交</td>
                        <elseif condition='$list_vo.status eq 3' />
                            <td class="public_content_qianmian">已退货</td>
                        <else />
                            <option value="0">--</option>
                        </if>
                        <td class="public_content_qianmian">{$list_vo.qy_name}</td>
                        <td class="public_content_qianmian">{$list_vo.qy_uid}</td>
                        <td class="public_content_qianmian">{$list_vo.bangding_time}</td>
                        <td class="public_content_qianmian">{$list_vo.nickName}</td>
                        <td class="public_content_qianmian">{$list_vo.tijiao_time}</td>
                        <td class="public_content_qianmian">{$list_vo.tuihuo_reason}</td>
                        <td class="public_content_qianmian">{$list_vo.tuihuo_time}</td>
                    </tr>
                </volist>
                <else/>
                <td colspan="100" class="text-center"> 暂时没有内容 </td>
            </notempty>
            </tbody>
        </table>
    </div>
    <!-- 分页 -->
    <div class="page">
        {$page}
    </div>
</block>

<block name="script">
    <link href="__STATIC__/datetimepicker/css/datetimepicker.css" rel="stylesheet" type="text/css">
    <php>if(C('COLOR_STYLE')=='blue_color') echo '<link href="__STATIC__/datetimepicker/css/datetimepicker_blue.css" rel="stylesheet" type="text/css">';</php>
    <link href="__STATIC__/datetimepicker/css/dropdown.css" rel="stylesheet" type="text/css">
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/bootstrap-datetimepicker.min.js"></script>
    <script type="text/javascript" src="__STATIC__/datetimepicker/js/locales/bootstrap-datetimepicker.zh-CN.js" charset="UTF-8"></script>
    <!-- 引入CSS、JS开始 -->
    <link href="__CSS__/wash_helper/gm_table_public.css" rel="stylesheet" type="text/css">
    <!-- 引入CSS、JS结束 -->
    <script type="text/javascript">
        /* 当前子菜单栏高亮 */
        highlight_subnav('{:U('QRcode/qrcode_admin')}');

        query = function query(){
            var url = "/wash_helper/index.php?s=/Admin/QRcode/pici_detail";
            var id = $('#id').val();
            var qrcode_id = $('#qrcode_id').val();
            var qy_name = $('#qy_name').val();
            var qy_uid = $('#qy_uid').val();
            var type = $("#sel option:selected").val();

            if(id != ""){
                url += "/id/" + id;
            }
            if(qrcode_id != ""){
                url += "/qrcode_id/" + qrcode_id;
            }
            if(qy_name != ""){
                url += "/qy_name/" + qy_name;
            }
            if(qy_uid != ""){
                url += "/qy_uid/" + qy_uid;
            }
            if(type != ""){
                url += "/type/" + type;
            }

            window.location.href = url;
        };
    </script>
</block>